#include <algorithm>
#include <vector>
#include <memory>
#include "SortUtils.h"
#include "ClsExample.h"

bool compareS(const std::shared_ptr<Human> &data1, const std::shared_ptr<Human> &data2)
{
    return data1->getAge() < data2->getAge();
}

bool compareL(const std::shared_ptr<Human> &data1, const std::shared_ptr<Human> &data2)
{
    return data1->getAge() > data2->getAge();
}

void sortS2L(std::vector<std::shared_ptr<Human>> &humans)
{
    sort(humans.begin(), humans.end(), compareS);
}

void sortL2S(std::vector<std::shared_ptr<Human>> &humans)
{
    sort(humans.begin(), humans.end(), compareL);
}